package com.nextbus.model;

/**
 * 用来存储当前在路上行驶的车的信息的类
 * @author dxt
 *
 */
public class VehicleLocationsData {

	private String id;//车的id号
	private String routeTag;//路线名称
	private String dirTag; //方向名称
	private String lat;
	private String lon;
	private String secsSinceReport;//距离报告已经有几秒了
	private String predictable;
	private String heading;//车开的方向，0——360里面有个指向的角度
	private String speedKmHr;//速度
	
	public VehicleLocationsData(String id, String routeTag, String dirTag,
			String lat, String lon, String secsSinceReport, String predictable,
			String heading, String speedKmHr) {
		super();
		this.id = id;
		this.routeTag = routeTag;
		this.dirTag = dirTag;
		this.lat = lat;
		this.lon = lon;
		this.secsSinceReport = secsSinceReport;
		this.predictable = predictable;
		this.heading = heading;
		this.speedKmHr = speedKmHr;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getRouteTag() {
		return routeTag;
	}
	public void setRouteTag(String routeTag) {
		this.routeTag = routeTag;
	}
	public String getDirTag() {
		return dirTag;
	}
	public void setDirTag(String dirTag) {
		this.dirTag = dirTag;
	}
	public String getLat() {
		return lat;
	}
	public void setLat(String lat) {
		this.lat = lat;
	}
	public String getLon() {
		return lon;
	}
	public void setLon(String lon) {
		this.lon = lon;
	}
	public String getSecsSinceReport() {
		return secsSinceReport;
	}
	public void setSecsSinceReport(String secsSinceReport) {
		this.secsSinceReport = secsSinceReport;
	}
	public String getPredictable() {
		return predictable;
	}
	public void setPredictable(String predictable) {
		this.predictable = predictable;
	}
	public String getHeading() {
		return heading;
	}
	public void setHeading(String heading) {
		this.heading = heading;
	}
	public String getSpeedKmHr() {
		return speedKmHr;
	}
	public void setSpeedKmHr(String speedKmHr) {
		this.speedKmHr = speedKmHr;
	}
	@Override
	public String toString() {
		return "VehicleLocationsData [id=" + id + ", routeTag=" + routeTag
				+ ", dirTag=" + dirTag + ", lat=" + lat + ", lon=" + lon
				+ ", secsSinceReport=" + secsSinceReport + ", predictable="
				+ predictable + ", heading=" + heading + ", speedKmHr="
				+ speedKmHr + "]";
	}
	
	//获得实时车辆的弹出框内信息，并且有重点显示
	public StringBuffer getSpinnet() {
		StringBuffer vehicleSpinnet=new StringBuffer();
		vehicleSpinnet.append("<br/>路线名称: <b>"+getRouteTag()+"</b>")
						.append("<br/>当前方向: <b>"+getDirTag()+"</b>")
						.append("<br/>车辆编号: <b>"+getId()+"</b>")
						.append("<br/>距上次更新: <b>"+getSecsSinceReport()+"</b>"+"秒")
						.append("<br/>车辆行驶的朝向: <b>"+getHeading()+"</b>"+"度(°)");
		return vehicleSpinnet;		
	}
	

}
